import $http from '../assets/js/http'

// 区域查询
export async function searchArea({
  number,
  name,
  page = 1
}) {
  return $http.post('building/Building/searchArea', {
    number,
    name,
    page
  })
}

// 区域修改
export async function alterArea({
  affiliationName,
  affiliationNumber,
  site,
  createman,
  createtime,
  remark
  // alterArea
}) {
  // console.log(affiliationName);
  return $http.post('building/Building/alterArea', {
    affiliationName,
    affiliationNumber,
    site,
    createman,
    createtime,
    remark
    // alterArea
  })
}
// 区域新增
export async function newArea({
  affiliationName,
  site,
  remark,
  createman
}) {
  return $http.post('building/Building/newArea', {
    affiliationName,
    site,
    remark,
    createman
  })
}

// 区域删除
export async function deleteArea(
  affiliationNumber
) {
  return $http.post('building/Building/deleteArea', {
    affiliationNumber
  })
}

// 获取宿舍楼编号,名称
export function getArea() {
  return $http.post('building/Building/getArea')
}
